#ifndef _DevicesDisk_H_
#define _DevicesDisk_H_

#include "stdint.h"

#define DISK_SIZE           (1024 * 1024 * 1024)
#define DISK_BLOCK_SIZE     512
#define DISK_BLOCK_COUNT    (DISK_SIZE / DISK_BLOCK_SIZE)


#define DISK_MBR_ADDR       0x00000000
#define DISK_DBR_ADDR       0x00100000
#define DISK_FAT1_ADDR      (DISK_DBR_ADDR + 0x00001000)
#define DISK_FAT2_ADDR      (DISK_DBR_ADDR + 0x00021000)
#define DISK_DIR_ADDR       (DISK_DBR_ADDR + 0x00041000)
#define DISK_CMD_ADDR       (DISK_DBR_ADDR + 0x00045000)
#define DISK_README_ADDR    (DISK_DBR_ADDR + 0x00049000)
#define DISK_DATA_ADDR      (DISK_DBR_ADDR + 0x0004D000)

#define DISK_MBR_SIZE       (512 * 1)
#define DISK_DBR_SIZE       (512 * 1)
#define DISK_FAT_SIZE       (512 * 1)
#define DISK_DIR_SIZE       (512 * 1)
#define DISK_CMD_SIZE       (1024 * 4)
#define DISK_README_SIZE    (1024 * 4)
#define DISK_DATA_SIZE      (1024 * 1024)


void vDiskInit(void);

int8_t cDiskRead(uint32_t uiOffset, uint8_t * pucBuff, uint32_t usLength);
int8_t cDiskWrite(uint32_t uiOffset, uint8_t * pucBuff, uint32_t usLength);

#endif
